#!ipxe

goto ${menu} ||

:live_menu
set os Voyager Live
menu ${os} - Current Arch [ ${arch} ]
iseq ${arch} x86_64 && set arch_a amd64 || set arch_a ${arch}
item --gap ${os} Versions
item focal ${space} ${os} Focal
item bionic ${space} ${os} Bionic
item buster ${space} ${os} Buster
item eoan ${space} ${os} Eoan
choose live_version || goto live_exit
goto ${live_version}

:focal
set squash_url ${live_endpoint}{{ endpoints["voyager-focal-squash"].path }}filesystem.squashfs
set kernel_url ${live_endpoint}{{ endpoints["voyager-focal-squash"].path }}
imgfree
kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} initrd=initrd ${cmdline}
initrd ${kernel_url}initrd
boot

:bionic
set squash_url ${live_endpoint}{{ endpoints["voyager-bionic-squash"].path }}filesystem.squashfs
set kernel_url ${live_endpoint}{{ endpoints["voyager-bionic-squash"].path }}
imgfree
kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=http fetch=${squash_url} initrd=initrd ${cmdline}
initrd ${kernel_url}initrd
boot

:buster
set squash_url ${live_endpoint}{{ endpoints["voyager-buster-squash"].path }}filesystem.squashfs
set kernel_url ${live_endpoint}{{ endpoints["voyager-buster-squash"].path }}
imgfree
kernel ${kernel_url}vmlinuz boot=live fetch=${squash_url} initrd=initrd ${cmdline}
initrd ${kernel_url}initrd
boot

:eoan
set squash_url ${live_endpoint}{{ endpoints["voyager-eoan-squash"].path }}filesystem.squashfs
set kernel_url ${live_endpoint}{{ endpoints["voyager-eoan-squash"].path }}
imgfree
kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=url url=${squash_url} initrd=initrd ${cmdline}
initrd ${kernel_url}initrd
boot

:live_exit
clear menu
exit 0
